package com.ydd.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SysMenu implements Serializable {

    private Integer id;

    private Integer pid;

    private String path;

    private String component;

    private String title;

    private String icon;

    @JsonProperty("is_show")
    private Integer isShow;

    @JsonProperty("is_cache")
    private Integer isCache;

    @JsonProperty("is_link")
    private Integer isLink;

    private String redirect;

    @TableField(fill = FieldFill.INSERT)  // mp自动填充
    @JsonProperty("create_date")
    private LocalDateTime createDate;

    @TableField(fill = FieldFill.INSERT_UPDATE)  // mp自动填充
    @JsonProperty("update_date")
    private LocalDateTime updateDate;

    @TableLogic
    @JsonProperty("del_flag")
    private Integer delFlag;

    @ApiModelProperty("类型，1是菜单，2按钮")
    private Integer type;

    private Integer sort;

    private String mark;

    @JsonProperty("default_data")
    private String defaultData;


}
